<template>
    <el-carousel class="home_carousel" height="350px">
        <el-carousel-item v-for="item in imgArr" :key="item.alt">
            <img style="width: 100%; border-radius: 4px; height: 100%; object-fit: cover;" :src="item.img" :alt="item.alt">
        </el-carousel-item>
    </el-carousel>
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import img1 from '@/assets/images/web-banner-1.png'
import img2 from '@/assets/images/web-banner-2.png'
import img3 from '@/assets/images/web-banner-3.png'
import img4 from '@/assets/images/web-banner-4.png'
let imgArr = reactive([
    {
        img: img1,
        alt: 'web-banner-1'
    },
    {
        img: img2,
        alt: 'web-banner-2'
    },
    {
        img: img3,
        alt: 'web-banner-3'
    },
    {
        img: img4,
        alt: 'web-banner-4'
    },
])
</script>
<style scoped lang="scss"></style>
<style scoped>
.demonstration {
    color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
    opacity: 0.75;
    margin: 0;
    text-align: center;
    object-fit: cover
}

.el-carousel__item:nth-child(2n) {
    /* background-color: #99a9bf; */
    display: flex;
    align-items: center;
}

.el-carousel__item:nth-child(2n + 1) {
    /* background-color: #d3dce6; */
    display: flex;
    align-items: center;
}

@media (max-width:768px) {
    :deep(.el-carousel__container) {
        height: 200px !important;
    }
}
</style>